package com.wang.util;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * Created by wangq on 2021/7/11.
 */
public class DataSourceUtil {
    private DataSourceUtil() {

    }

    private static DruidDataSource druidDataSource = new DruidDataSource();

    static {
        druidDataSource.setDriverClassName("com.mysql.jdbc.Driver");
        druidDataSource.setUrl("jdbc:mysql:///study");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("123456");
    }


    public static DruidDataSource getInstance() {
        return druidDataSource;
    }
}
